Fix Python mode error caused by incorrect indentation
authorkobarity <kobarity@gmail.com>
Sat, 16 Sep 2023 14:14:45 +0000 (23:14 +0900)
committerEli Zaretskii <eliz@gnu.org>
Sat, 8 Jun 2024 12:27:47 +0000 (15:27 +0300)
commitc03cafba390603de653def097fdcf9566d502061
tree3b844ea9cce930f18f4813032ee0b0f924ee5abf
parentd7be9fdbc009ecf314e1ae9166429188b6ddb121
Fix Python mode error caused by incorrect indentation

* lisp/progmodes/python.el (python-indent--calculate-indentation):
Guard against negative indentation.  (Bug #65870)

* test/lisp/progmodes/python-tests.el
(python-indent-badly-indented-block-end): New test.
lisp/progmodes/python.el
test/lisp/progmodes/python-tests.el